Skip to content

Add cpacs format checker - #1421

Draft
svengoldberg wants to merge 14 commits into
mainfrom
add_cpacs_format_checker
Draft

Add cpacs format checker#1421
svengoldberg wants to merge 14 commits into
mainfrom
add_cpacs_format_checker

Conversation

@svengoldberg

@svengoldberg svengoldberg commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Do not merge until #1406 is merged

General information

The branch to merge is branched off conda-forge-migration and hence should be kept in sync with that one. Depends on #1406.
Since conda-forge-migration applies major changes to the pixi.toml, it is most reasonable to already include these changes in this PR to avoid merge conflicts later.

Description

This PR includes the external cpacs schema tool in the TiGL repo and our CI workflow. Hence, a wrong indented or written CPACS XSD in our repo would lead to a failed pipeline.
This could be of interested when we edit the XSD on our own and before the merge is done in CPACS.

How Has This Been Tested?

The pipeline ran on a dummy branch and failed when I provoked an error by wrong indenting of the XSD

Fixes #1420

Checklist for PR Author:

  • Unit or integration test added (if applicable)
  • Python interface updated (if applicable)
  • Python test added (if Python interface updated)
  • Doxygen docstrings added
  • ChangeLog.md updated

joergbrech and others added 14 commits July 28, 2026 15:13
The failing wing W14_ChaDih has tip sections translated by exactly (0, 1, 1) and (0, 2, 2) — a perfect 45° dihedral. CTiglWingHelper::GetMajorDirection() picks the span axis by comparing accumulated |Y| vs |Z| with a plain >=, and for this wing those sums are mathematically equal, so the winner is decided by last-ULP rounding — which differs on arm64 (FMA contraction, Apple libm). The CI numbers prove it: 43.152389734005403 + 46.847610265994597 = 90.0 exactly — after SetSweep nudged the tip, the tie flipped the major axis and the dihedral was measured as its complement. Fix: a relative-tolerance tie-break (GreaterOrTied, 1e-8) in GetMajorDirection/GetDeepDirection (src/wing/CTiglWingHelper.cpp) so near-ties resolve deterministically to the conventional axis on every platform.

2. BSplineInterpolation.withKinksShield — over-strict test, fixed.
ArraysMatch defaults to exact ==, but the 0.5 parameter is derived arithmetic (tigl::Interpolate rescaling between kink params), which lands 1 ULP off on arm64. The test now uses InTolerance(1e-14).

3. SIGABRT in makeLoft.nacelleInverted — narrowed, needs one more CI run.
Three things the log tells us: (a) guideCurvePatches.nacelleInverted — same .brep inputs through MakePatches::Perform directly — passes on macOS, so the crash lives in the CTiglMakeLoft wrapper path (tolerance 1e-6 vs 1e-7, plus ConcatenateWire and CloseShape). That's why the MakePatches null-guard in your last commit couldn't fix it. (b) gtest catches C++ exceptions on POSIX, so a thrown CTiglError/Standard_Failure would show as a test failure, not an abort. (c) No libc++abi/assert message reached stderr — this is a silent abort (terminate-in-noexcept, heap check, or a direct abort()), which can't be pinpointed by reading code. So I added a temporary step to .github/workflows/build-test.yml that, when the macOS test job fails, reruns makeLoft.* under lldb --batch with thread backtrace all on crash — the next CI run will hand you the exact crash site.
Currently, the schema check is only included in the CI test on the
latest linux version in Debug mode. That should be sufficient to check.
@github-actions

Copy link
Copy Markdown
Contributor

PR Reminders

This PR has changes in src/, and tests/unittests/ but not in TIGLCreator/, tests/integrationtests/, tests/python/, or bindings/python_internal/. ChangeLog.md has changes.

  • 💡 Tip: Please check if new classes need to be added to the Python bindings

This is an automated reminder from CI

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 53.57143% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.22%. Comparing base (cdb546a) to head (ff1e4d4).

Files with missing lines Patch % Lines
src/wing/CTiglWingHelper.cpp 54.16% 11 Missing ⚠️
src/contrib/MakePatches.cxx 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1421      +/-   ##
==========================================
+ Coverage   73.19%   73.22%   +0.02%     
==========================================
  Files         324      324              
  Lines       28606    28594      -12     
==========================================
- Hits        20939    20938       -1     
+ Misses       7667     7656      -11     
Flag Coverage Δ
unittests 73.22% <53.57%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/contrib/MakePatches.cxx 84.89% <50.00%> (-0.76%) ⬇️
src/wing/CTiglWingHelper.cpp 81.04% <54.16%> (-1.03%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include the CPACS schema tool in our repo and workflow

2 participants